package main

import "fmt"

type Usb interface {
	start()
	stop()
}

type Phone struct {
	Name string
}

type Camera struct {
	Name string
}

func (this *Phone) start() {
	fmt.Println(this.Name, "start()")
}
func (this *Phone) stop() {
	fmt.Println(this.Name, "stop()")
}

func (this *Camera) start() {
	fmt.Println(this.Name, "start()")
}
func (this *Camera) stop() {
	fmt.Println(this.Name, "stop()")
}

type Computer struct {
	Name string
}

func (this *Computer) working(thisUsb Usb) {
	thisUsb.start()
	thisUsb.stop()
}
func main() {
	phone := Phone{
		"Mi",
	}
	camera := Camera{
		"Canon",
	}
	computer := Computer{
		"Lenove",
	}
	computer.working(&phone)
	computer.working(&camera)
}
